package org.seler.spring.ioc.AdditionalCapabilities;

import org.springframework.context.ApplicationListener;

public class BlackListNotifier implements ApplicationListener<BlackListEvent> {

	  private String notificationAddress;

	  public void setNotificationAddress(String notificationAddress) {
	      this.notificationAddress = notificationAddress;
	  }

	  public void onApplicationEvent(BlackListEvent event) {
	        // notify appropriate parties via notificationAddress...
		  if(event != null){
			  
			  System.out.println(event.getAddress() + " is in black list!");
		  }

	  }
	}
